package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_withdraw;

//DAO
public interface T_withdrawMapperBase {

	// 根据id查看
	@Select("SELECT * FROM t_withdraw  WHERE WITHDRAWID = #{withdrawid}")
	public ApiT_withdraw findT_withdrawById(Integer withdrawid);

	// 查看数据集
	@Select("SELECT * FROM T_withdraw")
	public List<ApiT_withdraw> findT_withdraws();

	// 根据条件查看数据集
	public List<Map<String, Object>> findT_withdrawsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO t_withdraw (USER_ID, MONEY, TYPE, OPENOUTLETS, OPENNAME, RECEIVEACCOUNT, STATUS, HANDLEMSG, CREATE_TIME, HANDLE_TIME) VALUES (#{user_id}, #{money}, #{type}, #{openoutlets}, #{openname}, #{receiveaccount}, #{status}, #{handlemsg}, #{create_time}, #{handle_time})")
	@Options(useGeneratedKeys = true, keyProperty = "withdrawid")
	public int insertT_withdraw(ApiT_withdraw t_withdraw);

	// 修改
	@Update("UPDATE t_withdraw SET USER_ID = #{user_id}, MONEY = #{money}, TYPE = #{type}, OPENOUTLETS = #{openoutlets}, OPENNAME = #{openname}, RECEIVEACCOUNT = #{receiveaccount}, STATUS = #{status}, HANDLEMSG = #{handlemsg}, CREATE_TIME = #{create_time}, HANDLE_TIME = #{handle_time} WHERE WITHDRAWID = #{withdrawid}")
	public int updateT_withdraw(ApiT_withdraw t_withdraw);

	// 删除
	@Delete("DELETE FROM t_withdraw  WHERE WITHDRAWID = #{withdrawid}")
	public int deleteT_withdraw(Integer withdrawid);

	// Foreign keys revelant

	// region Indexs revelant

}
